/**
 * @author：anlzou
 * @Date：Created in9:56 2021/4/19
 * @Github：https://github.com/anlzou
 * @Description：
 */
package com.anlzou.threads;

public class Threads2 implements Runnable{
    public void run() {
        System.out.println("通过Runnable实现多线程、名称："+Thread.currentThread().getName());
    }

    public void createThread(){
        Thread thread = new Thread(new Threads2());
        thread.setName("RunnableImplTest");
        thread.start();
        System.out.println("主线程名称："+Thread.currentThread().getName());
    }
}
